15. Lab III: Build a Dog GraphQL API (Queries & Exceptions)
Lab III: Build a Dog GraphQL API
Let's go further with your Dog GraphQL API (and further distinguish it from the earlier REST API) by adding the functionality for queries, mutations and exception handling.
Queries & Exceptions
- Step 1: Create resolvers that implement
GraphQLQueryResolver
matching the operations in the GraphQL schema.- Query
- findDogBreeds
- findDogBreedById
- findAllDogNames
- Mutation
- deleteDogBreed
- updateDogName
- Step 2: Make sure errors are handled appropriately.
- If an id is requested that doesn’t exist, appropriately handle the error